From d1895441b3bad78953fda5481c23d711cdbaee84 Mon Sep 17 00:00:00 2001 From: Tim Deegan Date: Mon, 4 Jun 2007 17:09:12 +0100 Subject: [PATCH] [HVM] Save/restore: trigger FPU state save based on v->fpu_initialised and not on the i387_valid flag, which has no meaning in this context. Signed-off-by: Tim Deegan --- xen/arch/x86/hvm/hvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 45a1854568..1d70e4a399 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -269,7 +269,7 @@ static int hvm_save_cpu_ctxt(struct domain *d, hvm_domain_context_t *h) /* Other vcpu register state */ vc = &v->arch.guest_context; - if ( vc->flags & VGCF_i387_valid ) + if ( v->fpu_initialised ) memcpy(ctxt.fpu_regs, &vc->fpu_ctxt, sizeof(ctxt.fpu_regs)); else memset(ctxt.fpu_regs, 0, sizeof(ctxt.fpu_regs)); @@ -361,7 +361,7 @@ static int hvm_load_cpu_ctxt(struct domain *d, hvm_domain_context_t *h) vc->debugreg[6] = ctxt.dr6; vc->debugreg[7] = ctxt.dr7; - vc->flags = VGCF_i387_valid | VGCF_online; + vc->flags = VGCF_online; v->fpu_initialised = 1; /* Auxiliary processors should be woken immediately. */ -- 2.30.2